import UserDetailComponent from "@userList/components/UserDetailComponent";
import { drawerFormState } from "@userList/store";
export const modalConfig = () => {
  const defineModal = {
    modalInstance: ref(null),
    loading: ref(false),
    visible: ref(false),
    maskClosable: true,
    title: ref(""),
    width: "800px",
    formState: drawerFormState,
    slot: {
      extra_form_item: () => <UserDetailComponent />,
      formSlot: {
        footer: (
          <>
            <div style="width: 100%;display: grid;place-items: center;margin: 16px 0;">
              <a-button
                type="primary"
                onClick={() => (defineModal.visible.value = false)}
              >
                {$t("base.ok")}
              </a-button>
            </div>
          </>
        ),
      },
    },
  };
  return defineModal;
};
